<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
    <div id="demo">
        <h1>学校名称:{{_data.name}}</h1>
        <h1>学校地址:{{address}}</h1>
        <button v-on:click="showInfo">点我提示信息</button>
        <button @click="showInfo2(11,22,33)">点我提示信息</button>
    </div>

    <script type="text/javascript">
    const vm = new Vue({
        el: '#demo',
        data:{
            name:'尚硅谷',
            address:'科技园'
        },
        methods:{
            showInfo(){
                console.log(this),
                alert('同学你好')
            },
            showInfo2(n1,n2,n3,n4){
                console.log(n1,n2,n3,n4),
                alert('同学你好')
            }
        }
    })
    </script>
</body>
</html>